﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home/Layouts/Home.Master" AutoEventWireup="true"
    CodeBehind="ViewCart.aspx.cs" Inherits="MLM.Home.Pages.ViewCart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="CartView">
        <asp:GridView runat="server" ID="gvShoppingCart" AutoGenerateColumns="False" EmptyDataText="Shopping cart empty product"
            Width="100%" CellPadding="4" ShowFooter="True" DataKeyNames="ProductId" OnRowDataBound="gvShoppingCart_RowDataBound"
            OnRowCommand="gvShoppingCart_RowCommand" BackColor="White" BorderColor="#8D8155"
            BorderStyle="None" BorderWidth="1px" ForeColor="Black" GridLines="Vertical">
            <HeaderStyle HorizontalAlign="Left" BackColor="#E9EAEF" ForeColor="Black" Font-Bold="True"
                Height="40px" />
            <FooterStyle HorizontalAlign="Right" BackColor="#CCCC99" />
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                        <div style="padding: 5px;">
                            <%# Container.DataItemIndex + 1 %>
                        </div>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Name" HeaderText="Product Name" />
                <asp:TemplateField HeaderText="Count">
                    <ItemTemplate>
                        <asp:TextBox runat="server" ID="txtQuantity" Columns="5" Text='<%# Eval("Quantity") %>'></asp:TextBox><br />
                        <asp:LinkButton runat="server" ID="btnRemove" Text="Remove" CommandName="Remove"
                            CommandArgument='<%# Eval("ProductId") %>' Style="font-size: 12px;"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="UnitPrice" HeaderText="Price">
                    <HeaderStyle HorizontalAlign="Right" />
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="Points" HeaderText="Points (PV)">
                    <HeaderStyle HorizontalAlign="Right" />
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="VAT" HeaderText="VAT (%)">
                    <HeaderStyle HorizontalAlign="Right" />
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="TotalPrice" HeaderText="Total Price">
                    <HeaderStyle HorizontalAlign="Right" />
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
            </Columns>
            <RowStyle BackColor="#F7F7DE" />
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
        <br />
        <asp:Button runat="server" ID="btnUpdateCart" Text="Update to cart" OnClick="btnUpdateCart_Click"
            CssClass="button" />
        <asp:Button runat="server" ID="btnPayMentCart" Text="Cart Out" CssClass="button" />
    </div>
</asp:Content>
